﻿@inherits Vowei.Web.G18nWebViewPage<Vowei.Core.Models.Project>
@using System.Web.Mvc.Html 
@using Vowei.Web.Helpers
@{
    ViewBag.Title = string.Format("项目 [{0}] 的进度安排信息", Model.Title);
    Layout = "";
}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>@ViewBag.Title</title>
	<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
	<link href="/Content/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
	<script src="@Url.Content("~/Scripts/jquery-1.4.4.js")" type="text/javascript"></script>
    
       <link rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css">
   <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/base/base-min.css"> 
   <script src="http://static.simile.mit.edu/timeline/api-2.3.0/timeline-api.js?bundle=true" type="text/javascript"></script>
 
   <script>
       var tl;
       var timeline_data = @Html.Raw(ViewData[ViewHelpers.JsonObjectKey] as string);
       $(document).ready(function() {
           var tl_el = document.getElementById("tl");
           var eventSource1 = new Timeline.DefaultEventSource();

           var theme1 = Timeline.ClassicTheme.create();
           theme1.autoWidth = true; // Set the Timeline's "width" automatically.
           // Set autoWidth on the Timeline's first band's theme,
           // will affect all bands.
           theme1.timeline_start = Date.parse('@Model.StartDate');
           theme1.timeline_stop = Date.parse('@Model.DueDate');

           var d = Timeline.DateTime.parseGregorianDateTime("2011")
           var bandInfos = [
                Timeline.createBandInfo({
                    zones: [
                        {
                            start: theme1.timeline_start,
                            end: theme1.timeline_end,
                            magnify: 10,
                            unit: Timeline.DateTime.DAY
                        }
                    ],
                    width: "100%", // set to a minimum, autoWidth will then adjust
                    intervalUnit: Timeline.DateTime.WEEK,
                    intervalPixels: 200,
                    eventSource: eventSource1,
                    date: d,
                    theme: theme1,
                    layout: 'original'  // original, overview, detailed
                })
            ];

           // create the Timeline
           tl = Timeline.create(tl_el, bandInfos, Timeline.HORIZONTAL);

           var url = '.'; // The base url for image, icon and background image
           // references in the data
           eventSource1.loadJSON(timeline_data, url); // The data was stored into the 
           // timeline_data variable.
           tl.layout(); // display the Timeline
       });

       var resizeTimerID = null;
       function onResize() {
           if (resizeTimerID == null) {
               resizeTimerID = window.setTimeout(function () {
                   resizeTimerID = null;
                   tl.layout();
               }, 500);
           }
       }
   </script>
</head>

<body>
    <div class="page">

        <div id="header">
            <div id="title">
                <h1>@T("项目管理系统")</h1>
            </div>

            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>

            <table class="layout-grid" cellspacing="0" cellpadding="0">
              <tr>
                <td class="left-nav">
                   <dl class="demos-nav">
                      <dt>@T("项目管理")</dt>
                      <dd><a href="/Project/Progresses">@T("当前项目进度")</a></dd>
                      <dd><a href="/Project/My">@T("我的项目")</a></dd>                      
                      <dt>@T("新建任务")</dt>
                      <dd><a href="/Project/Create">@T("创建项目")</a></dd>
                      <dd><a href="/Requirement/Create">@T("创建需求")</a></dd>
                      <dd><a href="/Task/Create">@T("创建任务")</a></dd>
                      <dd><a href="/Issue/Create">@T("创建事故")</a></dd>
                      <dt>@T("任务查询")</dt>
                      <dd><a href="/Task/My">@T("我的任务")</a></dd>
                      <dt>@T("项目统计分析")</dt>
                      <dd><a href="">@T("工作量统计")</a></dd>
                      <dd><a href="">@T("挣值分析")</a></dd>
                      <dt>@T("配置管理")</dt>
                      <dd><a href="/Scm/Index">@T("浏览历史修改")</a></dd>
                      <dt>@T("团队管理")</dt>
                      <dd><a href="/User/Permission">@T("管理权限")</a></dd>
                      <dd><a href="/Account/ImportUsers">@T("从Excel导入团队成员")</a></dd>
                      <dt>@T("团队管理")</dt>
                      <dd><a href="/Project/">@T("所有项目")</a></dd>                      
                   </dl>
                </td>
                <td class="content">
                     <div id="main">
                        <div id="doc3" class="yui-t7">
                           <div id="bd" role="main">
	                           <div class="yui-g">
	                             <div id='tl'></div>
	                           </div>
	                         </div>
                        </div>
                        <div id="footer">
                        </div>
                     </div>
                </td>
              </tr>
            </table>
        </div>
    </div>
</body>
</html>

